<?php 
class LoginController extends Controller{
	public function __init(){

	}

	public function login(){
		if(IS_POST){
			$db=K('Login');
			if($db->login()){
				$this->success('登录成功','Order/index');
			}else{
				$this->error($db->error);
			}
		}else{			
			$this->display();
		}
	}

	public function code(){
		$code=new Code;
		$code->show();
	}

	public function out(){
		unset($_SESSION['user']);
		go('Index/index');
	}



}


?>